<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/debugging.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">debugging.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="debugging_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_DEBUGGING_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_DEBUGGING_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;NTL/ZZX.h&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#define FLAG_PRINT_ZZX 1</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="debugging_8h.html#afe4ec1df211071f92cba15ca36078592">   22</a></span>&#160;<span class="preprocessor">#define FLAG_PRINT_POLY 2</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="debugging_8h.html#a5baf4ada763e6e93c45dca5a7da1071f">   23</a></span>&#160;<span class="preprocessor">#define FLAG_PRINT_VEC 4   </span><span class="comment">/* decode to ZZX */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="debugging_8h.html#af044ab34c5a342e78f8a330e80f8dcfb">   24</a></span>&#160;<span class="preprocessor">#define FLAG_PRINT_DVEC 8  </span><span class="comment">/* decode to double float */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="debugging_8h.html#a7de40d96d5779033ef1cabed12b1833e">   25</a></span>&#160;<span class="preprocessor">#define FLAG_PRINT_XVEC 16 </span><span class="comment">/* decode to complex numbers */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="debugging_8h.html#ae7d763a262ed6a677f1542f333e51d77">   26</a></span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">// forward declarations</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">class </span>Ctxt;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">class </span>SecKey;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">class </span>EncryptedArray;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">class </span>PlaintextArray;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">class </span>DoubleCRT;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">extern</span> SecKey* <a class="code" href="namespacehelib.html#a0d7d15973181b665a33077ca529f9d47">dbgKey</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="keyword">extern</span> std::shared_ptr&lt;const EncryptedArray&gt; <a class="code" href="namespacehelib.html#a1f2eab09fe947de2ae6eb8328937f0bb">dbgEa</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">extern</span> NTL::ZZX <a class="code" href="namespacehelib.html#a11275c94e69653c6ca1c5b3ea8f85dba">dbg_ptxt</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="namespacehelib.html#aad44440822118a09af899ff2798464d3">   45</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#aad44440822118a09af899ff2798464d3">setupDebugGlobals</a>(</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <a class="code" href="classhelib_1_1_sec_key.html">SecKey</a>* debug_key,</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">const</span> std::shared_ptr&lt;const EncryptedArray&gt;&amp; debug_ea,</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    NTL::ZZX debug_ptxt = NTL::ZZX{})</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#ifdef HELIB_DEBUG</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <a class="code" href="namespacehelib.html#a0d7d15973181b665a33077ca529f9d47">dbgKey</a> = debug_key;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <a class="code" href="namespacehelib.html#a1f2eab09fe947de2ae6eb8328937f0bb">dbgEa</a> = debug_ea;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <a class="code" href="namespacehelib.html#a11275c94e69653c6ca1c5b3ea8f85dba">dbg_ptxt</a> = debug_ptxt;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  (void)debug_key;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  (void)debug_ea;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  (void)debug_ptxt;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;}</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="namespacehelib.html#aaa77bdb78bd529a55c239df60039e335">   64</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#aaa77bdb78bd529a55c239df60039e335">cleanupDebugGlobals</a>()</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;{</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <a class="code" href="namespacehelib.html#a0d7d15973181b665a33077ca529f9d47">dbgKey</a> = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <a class="code" href="namespacehelib.html#a1f2eab09fe947de2ae6eb8328937f0bb">dbgEa</a> = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <a class="code" href="namespacehelib.html#a11275c94e69653c6ca1c5b3ea8f85dba">dbg_ptxt</a> = NTL::ZZX{};</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a436a592900880109024757d11bb3949d">decryptAndPrint</a>(std::ostream&amp; s,</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                     <span class="keyword">const</span> Ctxt&amp; ctxt,</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                     <span class="keyword">const</span> SecKey&amp; sk,</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                     <span class="keyword">const</span> EncryptedArray&amp; ea,</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                     <span class="keywordtype">long</span> flags = 0);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;NTL::xdouble <a class="code" href="namespacehelib.html#a309c3ca72a6d812a3ea23d62e48e42bf">embeddingLargestCoeff</a>(<span class="keyword">const</span> Ctxt&amp; ctxt, <span class="keyword">const</span> SecKey&amp; sk);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keywordtype">double</span> <a class="code" href="namespacehelib.html#aeb2f4d4c24b1b5926fc02206f9b5db6a">realToEstimatedNoise</a>(<span class="keyword">const</span> Ctxt&amp; ctxt, <span class="keyword">const</span> SecKey&amp; sk);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#ac845c61472e33fa76df608e536b25b5a">checkNoise</a>(<span class="keyword">const</span> Ctxt&amp; ctxt,</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                <span class="keyword">const</span> SecKey&amp; sk,</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                <span class="keyword">const</span> std::string&amp; msg,</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keywordtype">double</span> thresh = 10.0);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#a19a60ea778c6bbcc5d2732ca137c7e15">decryptAndCompare</a>(<span class="keyword">const</span> Ctxt&amp; ctxt,</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                       <span class="keyword">const</span> SecKey&amp; sk,</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                       <span class="keyword">const</span> EncryptedArray&amp; ea,</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                       <span class="keyword">const</span> PlaintextArray&amp; pa);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a50b26a9740fbaba1c3b7b5c7e89ee55c">rawDecrypt</a>(NTL::ZZX&amp; plaintxt,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                <span class="keyword">const</span> std::vector&lt;NTL::ZZX&gt;&amp; zzParts,</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                <span class="keyword">const</span> DoubleCRT&amp; sKey,</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <span class="keywordtype">long</span> q = 0);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="comment">// Debug printing routines for vectors, ZZX&#39;es, print only a few entries</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> VEC&gt;</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="namespacehelib.html#af7844ba559695a1952e4d6309d21b354">   99</a></span>&#160;std::ostream&amp; <a class="code" href="namespacehelib.html#af7844ba559695a1952e4d6309d21b354">printVec</a>(std::ostream&amp; s, <span class="keyword">const</span> VEC&amp; v, <span class="keywordtype">long</span> nCoeffs = 40)</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;{</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="keywordtype">long</span> d = <a class="code" href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">lsize</a>(v);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <span class="keywordflow">if</span> (d &lt; nCoeffs)</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">return</span> s &lt;&lt; v; <span class="comment">// just print the whole thing</span></div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="comment">// otherwise print only 1st nCoeffs coefficients</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  s &lt;&lt; <span class="charliteral">&#39;[&#39;</span>;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">long</span> i = 0; i &lt; nCoeffs - 2; i++)</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    s &lt;&lt; v[i] &lt;&lt; <span class="charliteral">&#39; &#39;</span>;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  s &lt;&lt; <span class="stringliteral">&quot;... &quot;</span> &lt;&lt; v[d - 2] &lt;&lt; <span class="charliteral">&#39; &#39;</span> &lt;&lt; v[d - 1] &lt;&lt; <span class="charliteral">&#39;]&#39;</span>;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  <span class="keywordflow">return</span> s;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;}</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="namespacehelib.html#a742bf72a76d5b9389251abfee9223303">  113</a></span>&#160;<span class="keyword">inline</span> std::ostream&amp; <a class="code" href="namespacehelib.html#a742bf72a76d5b9389251abfee9223303">printZZX</a>(std::ostream&amp; s,</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                              <span class="keyword">const</span> NTL::ZZX&amp; poly,</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                              <span class="keywordtype">long</span> nCoeffs = 40)</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;{</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#af7844ba559695a1952e4d6309d21b354">printVec</a>(s, poly.rep, nCoeffs);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_DEBUGGING_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespacehelib_html_ae8f65ef133cee27ad846423d012d5487"><div class="ttname"><a href="namespacehelib.html#ae8f65ef133cee27ad846423d012d5487">helib::lsize</a></div><div class="ttdeci">long lsize(const std::vector&lt; T &gt; &amp;v)</div><div class="ttdoc">Size of STL vector as a long (rather than unsigned long)</div><div class="ttdef"><b>Definition:</b> NumbTh.h:652</div></div>
<div class="ttc" id="anamespacehelib_html_a1f2eab09fe947de2ae6eb8328937f0bb"><div class="ttname"><a href="namespacehelib.html#a1f2eab09fe947de2ae6eb8328937f0bb">helib::dbgEa</a></div><div class="ttdeci">std::shared_ptr&lt; const EncryptedArray &gt; dbgEa</div><div class="ttdef"><b>Definition:</b> debugging.cpp:24</div></div>
<div class="ttc" id="anamespacehelib_html_a0d7d15973181b665a33077ca529f9d47"><div class="ttname"><a href="namespacehelib.html#a0d7d15973181b665a33077ca529f9d47">helib::dbgKey</a></div><div class="ttdeci">SecKey * dbgKey</div><div class="ttdef"><b>Definition:</b> debugging.cpp:23</div></div>
<div class="ttc" id="anamespacehelib_html_a11275c94e69653c6ca1c5b3ea8f85dba"><div class="ttname"><a href="namespacehelib.html#a11275c94e69653c6ca1c5b3ea8f85dba">helib::dbg_ptxt</a></div><div class="ttdeci">NTL::ZZX dbg_ptxt</div><div class="ttdef"><b>Definition:</b> debugging.cpp:25</div></div>
<div class="ttc" id="anamespacehelib_html_a19a60ea778c6bbcc5d2732ca137c7e15"><div class="ttname"><a href="namespacehelib.html#a19a60ea778c6bbcc5d2732ca137c7e15">helib::decryptAndCompare</a></div><div class="ttdeci">bool decryptAndCompare(const Ctxt &amp;ctxt, const SecKey &amp;sk, const EncryptedArray &amp;ea, const PlaintextArray &amp;pa)</div><div class="ttdef"><b>Definition:</b> debugging.cpp:135</div></div>
<div class="ttc" id="anamespacehelib_html_af7844ba559695a1952e4d6309d21b354"><div class="ttname"><a href="namespacehelib.html#af7844ba559695a1952e4d6309d21b354">helib::printVec</a></div><div class="ttdeci">std::ostream &amp; printVec(std::ostream &amp;s, const VEC &amp;v, long nCoeffs=40)</div><div class="ttdef"><b>Definition:</b> debugging.h:99</div></div>
<div class="ttc" id="anamespacehelib_html_ac845c61472e33fa76df608e536b25b5a"><div class="ttname"><a href="namespacehelib.html#ac845c61472e33fa76df608e536b25b5a">helib::checkNoise</a></div><div class="ttdeci">void checkNoise(const Ctxt &amp;ctxt, const SecKey &amp;sk, const std::string &amp;msg, double thresh=10.0)</div><div class="ttdef"><b>Definition:</b> debugging.cpp:49</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="anamespacehelib_html_aaa77bdb78bd529a55c239df60039e335"><div class="ttname"><a href="namespacehelib.html#aaa77bdb78bd529a55c239df60039e335">helib::cleanupDebugGlobals</a></div><div class="ttdeci">void cleanupDebugGlobals()</div><div class="ttdoc">Cleanup function for clearing the global debug variables.</div><div class="ttdef"><b>Definition:</b> debugging.h:64</div></div>
<div class="ttc" id="anamespacehelib_html_aeb2f4d4c24b1b5926fc02206f9b5db6a"><div class="ttname"><a href="namespacehelib.html#aeb2f4d4c24b1b5926fc02206f9b5db6a">helib::realToEstimatedNoise</a></div><div class="ttdeci">double realToEstimatedNoise(const Ctxt &amp;ctxt, const SecKey &amp;sk)</div><div class="ttdef"><b>Definition:</b> debugging.cpp:28</div></div>
<div class="ttc" id="anamespacehelib_html_a742bf72a76d5b9389251abfee9223303"><div class="ttname"><a href="namespacehelib.html#a742bf72a76d5b9389251abfee9223303">helib::printZZX</a></div><div class="ttdeci">std::ostream &amp; printZZX(std::ostream &amp;s, const NTL::ZZX &amp;poly, long nCoeffs=40)</div><div class="ttdef"><b>Definition:</b> debugging.h:113</div></div>
<div class="ttc" id="anamespacehelib_html_a309c3ca72a6d812a3ea23d62e48e42bf"><div class="ttname"><a href="namespacehelib.html#a309c3ca72a6d812a3ea23d62e48e42bf">helib::embeddingLargestCoeff</a></div><div class="ttdeci">NTL::xdouble embeddingLargestCoeff(const Ctxt &amp;ctxt, const SecKey &amp;sk)</div><div class="ttdef"><b>Definition:</b> debugging.cpp:61</div></div>
<div class="ttc" id="anamespacehelib_html_a50b26a9740fbaba1c3b7b5c7e89ee55c"><div class="ttname"><a href="namespacehelib.html#a50b26a9740fbaba1c3b7b5c7e89ee55c">helib::rawDecrypt</a></div><div class="ttdeci">void rawDecrypt(NTL::ZZX &amp;plaintxt, const std::vector&lt; NTL::ZZX &gt; &amp;zzParts, const DoubleCRT &amp;sKey, long q=0)</div><div class="ttdef"><b>Definition:</b> debugging.cpp:148</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="anamespacehelib_html_aad44440822118a09af899ff2798464d3"><div class="ttname"><a href="namespacehelib.html#aad44440822118a09af899ff2798464d3">helib::setupDebugGlobals</a></div><div class="ttdeci">void setupDebugGlobals(SecKey *debug_key, const std::shared_ptr&lt; const EncryptedArray &gt; &amp;debug_ea, NTL::ZZX debug_ptxt=NTL::ZZX{})</div><div class="ttdoc">Setup function for setting up the global debug variables.</div><div class="ttdef"><b>Definition:</b> debugging.h:45</div></div>
<div class="ttc" id="anamespacehelib_html_a436a592900880109024757d11bb3949d"><div class="ttname"><a href="namespacehelib.html#a436a592900880109024757d11bb3949d">helib::decryptAndPrint</a></div><div class="ttdeci">void decryptAndPrint(std::ostream &amp;s, const Ctxt &amp;ctxt, const SecKey &amp;sk, const EncryptedArray &amp;ea, long flags=0)</div><div class="ttdef"><b>Definition:</b> debugging.cpp:69</div></div>
<div class="ttc" id="aclasshelib_1_1_sec_key_html"><div class="ttname"><a href="classhelib_1_1_sec_key.html">helib::SecKey</a></div><div class="ttdoc">The secret key.</div><div class="ttdef"><b>Definition:</b> keys.h:225</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
